package File;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo.txt");//"C:\\Users\\Administrator\\Desktop/3333.txt"
        String name = file.getName();
        System.out.println("name:"+name);
        long len = file.length();
        System.out.println("length:"+len);
        boolean ih = file.isFile();
        boolean cr = file.canRead();
        boolean cw = file.canWrite();
        System.out.println("是否隐藏"+ih);
        System.out.println("是否可读"+cr);
        System.out.println("是否可写"+cw);
    }
}
